<!DOCTYPE html>
<html>

<head>
    <include file="Share:meta" />
    <style type="text/css">
    .trstyle0 {
        background-color: #e8e8e8;
    }
   
    </style>
    <script type="text/javascript">


        function getYear() {
            var date = new Date();
            var year = date.getFullYear();
            return year;
        }

        function getMonth() {
            var date = new Date();
            var month = date.getMonth() + 1;
            if (month >= 1 && month <= 9) {
                month = "0" + month;
            }
            return month;
        }
    </script>
</head>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <include file="Share:header" />
        <include file="Share:left" />
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>业绩统计<small><a target="_blank"></a></small></h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                    <li class="active">业绩统计</li>
                </ol>
            </section>
            <!-- Main content -->
            <section class="content">
                <div class="box">
                    <div class="box-header with-border">
                        <form action="__APP__/Admin/Total/yeji" method="GET" role="form">
                            <div class="input-group input-group-sm" style="width:100%;">
                                <div class="col-xs-6 np">
                                    <input type="text" id="ctime" name="name" class="form-control pull-right" style="margin-right:5px;" placeholder="代理商名称" value="{$Think.get.name}">
                                </div> 

                                <div class="col-xs-3 np pull-left">
                                 
                                    <select name="year" id="year" class="form-control">
                                        <option value="">请选择年份</option>
                                        <for start="2016"  end="2027">
                                            <option value="{$i}">{$i}</option>
                                        </for>
                                    </select>
                                </div>
                                <div class="col-xs-2 np pull-left">
                                    <select name="month" id="month" class="form-control">
                                        <option value="">请选择月份</option>
                                        <option value="01">01</option>
                                        <option value="02">02</option>
                                        <option value="03">03</option>
                                        <option value="04">04</option>
                                        <option value="05">05</option>
                                        <option value="06">06</option>
                                        <option value="07">07</option>
                                        <option value="08">08</option>
                                        <option value="09">09</option>
                                        <option value="10">10</option>
                                        <option value="11">11</option>
                                        <option value="12">12</option>
                                    </select>
                                </div>
                                <div class="col-xs-1 np pull-right">
                                    <div class="input-group-btn">
                                        <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                                    </div>
                                </div>
                                    
                                <script type="text/javascript">
                                $(function() {
                                    $('#year').val('{$Think.get.year}');
                                    $('#month').val('{$Think.get.month}');
                                });
                                </script>
                                
                            </div>
                        </form>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-footer clearfix">
                        <!-- <div class="btn btn-info" style="float:left; height:30px; line-height:16px;">订单总数： {$info.order_num|default=0} </div> -->
                        <!-- <div class="btn btn-info" style="float:left; height:30px; line-height:16px; margin-left:8px;">总计金额： {$info.order_price|default=0} </div> -->

                        <!-- <div class="col-xs-3">
                            <div class="btn btn-info" style="float:left; height:30px; line-height:16px;">数量总计： {$data.AllCount|default=0} </div>
                        </div>
                        <div class="col-xs-3">
                            <div class="btn btn-info" style="float:left; height:30px; line-height:16px;">金额总计： {$data.Amount|default=0} </div>
                        </div> -->
                    </div>
                    <div class="box-body">
                        <table class="table table-bordered HjTable" border="1">
                            <tbody>
                                <tr style="background-color: #E6E6FA;">
                                    <th style="width: 20%;">代理商</th>
                                    <th style="width: 10%;">账号</th>
                                    <th style="width: 10%;">手机</th>
                                    <th style="width: 10%;">份数</th>
                                    <th style="width: 15%;">金额</th>
                                </tr>
                                <tr>
                                    <td colspan="3" align="center"><b>总计</b> &nbsp;</td>
                                    <td>{$data.AllCount|default=0}</td>
                                    <td>{$data.Amount|default=0}</td>
                                </tr>
                                <notempty name="list">
                                <volist name="list" id="vo">
                                    <tr class='trstyle{$vo.status}'>
                                        <td>{$vo.name}</td>
                                        <td>{$vo.username}</td>
                                        <td>{$vo.mobile}</td>
                                        <td>
                                            {$vo.num|default=0} 
                                        </td>
                                        <td>{$vo.order_price|default=0}</td>
                                    </tr>
                                </volist>
                                <else/>
                                <tr>
                                    <td colspan="7" style="text-align:center;">没有找到相关记录</td>
                                </tr>
                                </notempty>
                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer clearfix">
                        <ul class="pagination pagination-sm no-margin pull-right">
                            {$show}
                        </ul>
                    </div>
                </div>
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->
        <include file="Share:copyright" />
        <include file="Share:setting" />
    </div>
    <include file="Share:js" />
</body>
<script type="text/javascript">
    $("#Total").addClass("active");
    $("#order_yeji").addClass("active");
    $(function() {
        if ($('#year').val() == ''){
            $('#year').val(getYear());
            $('#month').val(getMonth());
        }
    })
</script>  
</html>
